package com.fastloan.jn.utils.other;


import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.List;

/**
 * Created by gelon on 2017/10/31.
 */
public class GsonUtil {


    public static <T> List<T> toList(String listJson,Class<T> clazz){
        Gson gson = new Gson();
        Type type = new TypeToken<List<T>>(){}.getType();
        return gson.fromJson(listJson,type);
    }

}
